import { reqGetDataList } from "@/api/user";

const state = {
    data:[]
}
const mutations = {
    SET_DATALIST(state,data){
        state.data = data
    }
}
const actions = {
    async getDataList({commit},{page,limit}){
        try{
            const result = await reqGetDataList(page,limit)
            commit('SET_DATALIST',result)
        }catch(error){
            alert('请求获取失败')

        }
    },
}
const getters = {}

export default {
    state,mutations,actions,getters
}
